home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / 8Bawl.bproj / wraps8.psw < prev    next >
Encoding:
Text File  |  1994-01-04  |  1.5 KB  |  45 lines

  1. // wraps8.psw: 8Bawl animations
  2. // Eric P. Scott, San Francisco State University, January 1994
  3.  
  4. // dissolve down from startpt; return fraction (<=0 => we made it all the way)
  5. defineps disdown(float startpt, bsrcx, bsrcy, bwidth, bheight;
  6.     userobject bgstate; float bdestx, bdesty, csrcx, csrcy, cwidth,
  7.     cheight; userobject cgstate; float cdestx, cdesty|float *endpt)
  8. startpt 1500 mul cvi realtime add
  9. {
  10.   bsrcx bsrcy bwidth bheight bgstate bdestx bdesty Sover composite
  11.   csrcx csrcy cwidth cheight cgstate cdestx cdesty
  12.   7 index realtime sub 1500 div
  13.   dup 0 le rightbuttondown or { exit } if
  14.   dissolve
  15.   flushgraphics
  16.   yield
  17. } bind loop
  18. 9 1 roll pop pop pop pop pop pop pop pop
  19. endpt
  20. endps
  21.  
  22. // dissolve up from startpt; return fraction (>=1 => we made it all the way)
  23. defineps disup(float startpt, bsrcx, bsrcy, bwidth, bheight;
  24.     userobject bgstate; float bdestx, bdesty, csrcx, csrcy, cwidth,
  25.     cheight; userobject cgstate; float cdestx, cdesty|float *endpt)
  26. buttondown
  27. startpt 1500 mul cvi realtime exch sub
  28. {
  29.   bsrcx bsrcy bwidth bheight bgstate bdestx bdesty Sover composite
  30.   csrcx csrcy cwidth cheight cgstate cdestx cdesty
  31.   realtime 8 index sub 1500 div
  32.   dup 1 ge rightbuttondown or { exit } if
  33.   buttondown 10 index xor {
  34.     0 currentmouse Above 0 findwindow {
  35.       3 1 roll pop pop currentowner currentcontext eq { exit } if
  36.     } { pop pop pop } ifelse
  37.   } if
  38.   dissolve
  39.   flushgraphics
  40.   yield
  41. } bind loop
  42. 10 1 roll pop pop pop pop pop pop pop pop pop
  43. endpt
  44. endps
  45.